package coroutines.job

import kotlinx.coroutines.*

class CoroutineTimeoutTest {
}

fun main() {
    runBlocking {
        launch {
            try {
                withTimeoutOrNull(20000) {
                    repeat(10) {
                        delay(500)
                        println("it = $it")
                    }
                }
            } catch (t: Throwable) {
                println("error: ${t.message}")
            }
        }
    }
}